#ifndef __GLES2GpuProgramManager_H__
#define __GLES2GpuProgramManager_H__

#include "GpuProgramManager.h"

namespace PVM
{
	class GLES2GpuProgramManager : public GpuProgramManager
	{
	public:
		typedef GpuProgram* (*CreateGpuProgramCallback)(ResourceManager* creator,
						const std::string& name, ResourceHandle handle,
						const std::string& group, bool isManual, ManualResourceLoader* loader,
						GpuProgramType gptype, const std::string& syntaxCode);
		
	private:
		typedef std::map<std::string, CreateGpuProgramCallback>::type ProgramMap;
		
	protected:
		Resource* createImpl(const std::string& name, ResourceHandle handle,
							 const std::string& group, bool isManual, ManualResourceLoader* loader,
							 const NameValuePairList* params);
		Resource* createImpl(const std::string& name, ResourceHandle handle,
							 const std::string& group, bool isManual, ManualResourceLoader* loader,
							 GpuProgramType gptype, const std::string& syntaxCode);
		
	public:
		GLES2GpuProgramManager();
		virtual ~GLES2GpuProgramManager();
		bool registerProgramFactory(const std::string& syntaxCode, CreateGpuProgramCallback createFn);
		bool unregisterProgramFactory(const std::string& syntaxCode);
	};
}

#endif
